﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="list.aspx.vb" Inherits="WSAD2013Project.list" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
    <br />
</p>
<p>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource2" Height="210px" Width="458px" 
        AllowSorting="True" DataKeyNames="ID" CellPadding="4" ForeColor="#333333" 
        GridLines="None">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="HeroName" HeaderText="HeroName" 
                SortExpression="HeroName" />
            <asp:BoundField DataField="AlterEgo" HeaderText="AlterEgo" 
                SortExpression="AlterEgo" />
            <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture">
            </asp:ImageField>
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="details.aspx?ID={0}" 
                HeaderText="Click for details" Text="More Details" />
            <asp:TemplateField HeaderText="Icon for Details">
                <ItemTemplate>
                    <asp:HyperLink ID="link" NavigateUrl='<%#"details.aspx?ID=" & Eval("ID")%>' runat="server">
                        <asp:Image ID="image" runat="server" ImageUrl="~/Images/details.gif" />
                    </asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
        <SortedAscendingCellStyle BackColor="#FDF5AC" />
        <SortedAscendingHeaderStyle BackColor="#4D0000" />
        <SortedDescendingCellStyle BackColor="#FCF6C0" />
        <SortedDescendingHeaderStyle BackColor="#820000" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:HeroesConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:HeroesConnectionString.ProviderName %>" 
        
        
        SelectCommand="SELECT [HeroName], [AlterEgo], [Picture], [ID] FROM [MoreDetails]">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:HeroesConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:HeroesConnectionString.ProviderName %>" 
        SelectCommand="SELECT [Hero Name] AS Hero_Name, [Alter Ego] AS Alter_Ego, [Picture] FROM [Heroes]">
    </asp:SqlDataSource>
</p>
<p>
</p>
</asp:Content>
